<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
  Class: Api::V3::UsersController
  
    &mdash; Ruby China API 文档
  
</title>

  <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  pathId = "Api::V3::UsersController";
  relpath = '../../';
</script>


  <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>


  </head>
  <body>
    <div class="nav_wrap">
      <iframe id="nav" src="../../class_list.html"></iframe>
      <div id="resizer"></div>
    </div>

    <div id="main" tabindex="-1">
      <div id="header">
        <div id="menu">
  
    <a href="../../_index.html">Index (U)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../../Api.html" title="Api (module)">Api</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../V3.html" title="Api::V3 (module)">V3</a></span></span>
     &raquo; 
    <span class="title">UsersController</span>
  
</div>

        <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../../class_list.html">

        <svg width="24" height="24">
          <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
        </svg>
    </a>
  
</div>
        <div class="clear"></div>
      </div>

      <iframe id="search_frame" src="../../class_list.html"></iframe>

      <div id="content"><h1>Class: Api::V3::UsersController
  
  
  
</h1>
<div class="box_info">
  
  <dl>
    <dt>Inherits:</dt>
    <dd>
      <span class="inheritName"><span class='object_link'><a href="ApplicationController.html" title="Api::V3::ApplicationController (class)">ApplicationController</a></span></span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">ActionController::API</li>
          
            <li class="next"><span class='object_link'><a href="ApplicationController.html" title="Api::V3::ApplicationController (class)">ApplicationController</a></span></li>
          
            <li class="next">Api::V3::UsersController</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
    </dd>
  </dl>
  

  
  
  
  
  

  

  
  <dl>
    <dt>Defined in:</dt>
    <dd>app/controllers/api/v3/users_controller.rb</dd>
  </dl>
  
</div>








  
    <h2>
      Instance Method Summary
      <small><a href="#" class="summary_toggle">collapse</a></small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#block-instance_method" title="#block (instance method)">#<strong>block</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>屏蔽用户.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#blocked-instance_method" title="#blocked (instance method)">#<strong>blocked</strong>  &#x21d2; Array[UserSerializer] </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>获取用户的已屏蔽的人（只能获取自己的）.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#favorites-instance_method" title="#favorites (instance method)">#<strong>favorites</strong>  &#x21d2; Array[TopicSerializer] </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>获取某个用户的收藏列表.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#follow-instance_method" title="#follow (instance method)">#<strong>follow</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>关注用户.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#followers-instance_method" title="#followers (instance method)">#<strong>followers</strong>  &#x21d2; Array[UserSerializer] </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>获取某个用户关注的人的列表.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#following-instance_method" title="#following (instance method)">#<strong>following</strong>  &#x21d2; Array[UserSerializer] </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>获取某个用户的关注者列表.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#index-instance_method" title="#index (instance method)">#<strong>index</strong>  &#x21d2; Array&lt;UserSerializer&gt; </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>获取热门用户.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#me-instance_method" title="#me (instance method)">#<strong>me</strong>  &#x21d2; UserDetailSerializer </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>获取当前用户的完整信息，用于个人设置修改资料.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#replies-instance_method" title="#replies (instance method)">#<strong>replies</strong>  &#x21d2; Array&lt;ReplyDetailSerializer&gt; </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>获取某个用户的回帖列表.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#show-instance_method" title="#show (instance method)">#<strong>show</strong>  &#x21d2; UserDetailSerializer </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>获取某个用户的详细信息.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#topics-instance_method" title="#topics (instance method)">#<strong>topics</strong>  &#x21d2; Array&lt;TopicSerializer&gt; </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>获取某个用户的话题列表.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#unblock-instance_method" title="#unblock (instance method)">#<strong>unblock</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>取消屏蔽用户.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#unfollow-instance_method" title="#unfollow (instance method)">#<strong>unfollow</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>取消关注用户.</p>
</div></span>
  
</li>

      
    </ul>
  


  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="ApplicationController.html" title="Api::V3::ApplicationController (class)">ApplicationController</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="ApplicationController.html#admin%3F-instance_method" title="Api::V3::ApplicationController#admin? (method)">#admin?</a></span>, <span class='object_link'><a href="ApplicationController.html#can%3F-instance_method" title="Api::V3::ApplicationController#can? (method)">#can?</a></span>, <span class='object_link'><a href="ApplicationController.html#current_ability-instance_method" title="Api::V3::ApplicationController#current_ability (method)">#current_ability</a></span>, <span class='object_link'><a href="ApplicationController.html#current_user-instance_method" title="Api::V3::ApplicationController#current_user (method)">#current_user</a></span>, <span class='object_link'><a href="ApplicationController.html#error%21-instance_method" title="Api::V3::ApplicationController#error! (method)">#error!</a></span>, <span class='object_link'><a href="ApplicationController.html#error_404%21-instance_method" title="Api::V3::ApplicationController#error_404! (method)">#error_404!</a></span>, <span class='object_link'><a href="ApplicationController.html#optional%21-instance_method" title="Api::V3::ApplicationController#optional! (method)">#optional!</a></span>, <span class='object_link'><a href="ApplicationController.html#requires%21-instance_method" title="Api::V3::ApplicationController#requires! (method)">#requires!</a></span></p>

  

  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="block-instance_method">
  
    #<strong>block</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>屏蔽用户</p>

<p>POST /api/v3/users/:id/block</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


175
176
177
178</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/controllers/api/v3/users_controller.rb', line 175</span>

<span class='kw'>def</span> <span class='id identifier rubyid_block'>block</span>
  <span class='id identifier rubyid_current_user'>current_user</span><span class='period'>.</span><span class='id identifier rubyid_block_user'>block_user</span><span class='lparen'>(</span><span class='ivar'>@user</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='lbrace'>{</span> <span class='label'>ok:</span> <span class='int'>1</span> <span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="blocked-instance_method">
  
    #<strong>blocked</strong>  &#x21d2; <tt>Array[<span class='object_link'><a href="../../UserSerializer.html" title="UserSerializer (class)">UserSerializer</a></span>]</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>获取用户的已屏蔽的人（只能获取自己的）</p>

<p>GET /api/v3/users/:id/blocked</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>offset</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>default: 0</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>limit</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>default: 20, range: 1..150</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array[<span class='object_link'><a href="../../UserSerializer.html" title="UserSerializer (class)">UserSerializer</a></span>]</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>收藏的话题列表</p>
</div>
      
    </li>
  
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="ApplicationController/AccessDenied.html" title="Api::V3::ApplicationController::AccessDenied (class)">AccessDenied</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


145
146
147
148
149
150
151
152
153
154</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/controllers/api/v3/users_controller.rb', line 145</span>

<span class='kw'>def</span> <span class='id identifier rubyid_blocked'>blocked</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:offset</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>Integer</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>0</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:limit</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>Integer</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>20</span><span class='comma'>,</span> <span class='label'>values:</span> <span class='int'>1</span><span class='op'>..</span><span class='int'>150</span>

  <span class='id identifier rubyid_raise'>raise</span> <span class='const'>AccessDenied</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>不可以获取其他人的 blocked_users 列表。</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_current_user'>current_user</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> <span class='op'>!=</span> <span class='ivar'>@user</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span>

  <span class='id identifier rubyid_user_ids'>user_ids</span> <span class='op'>=</span> <span class='id identifier rubyid_current_user'>current_user</span><span class='period'>.</span><span class='id identifier rubyid_blocked_user_ids'>blocked_user_ids</span><span class='lbracket'>[</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:offset</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:limit</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='rbracket'>]</span>
  <span class='ivar'>@blocked_users</span> <span class='op'>=</span> <span class='const'>User</span><span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>id:</span> <span class='id identifier rubyid_user_ids'>user_ids</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='ivar'>@blocked_users</span><span class='comma'>,</span> <span class='label'>root:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>blocked</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="favorites-instance_method">
  
    #<strong>favorites</strong>  &#x21d2; <tt>Array[<span class='object_link'><a href="../../TopicSerializer.html" title="TopicSerializer (class)">TopicSerializer</a></span>]</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>获取某个用户的收藏列表</p>

<p>GET /api/v3/users/:id/favorites</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>offset</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>default: 0</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>limit</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>default: 20, range: 1..150</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array[<span class='object_link'><a href="../../TopicSerializer.html" title="TopicSerializer (class)">TopicSerializer</a></span>]</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>收藏的话题列表</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


100
101
102
103
104
105
106
107
108</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/controllers/api/v3/users_controller.rb', line 100</span>

<span class='kw'>def</span> <span class='id identifier rubyid_favorites'>favorites</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:offset</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>Integer</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>0</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:limit</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>Integer</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>20</span><span class='comma'>,</span> <span class='label'>values:</span> <span class='int'>1</span><span class='op'>..</span><span class='int'>150</span>

  <span class='ivar'>@topic_ids</span> <span class='op'>=</span> <span class='ivar'>@user</span><span class='period'>.</span><span class='id identifier rubyid_favorite_topic_ids'>favorite_topic_ids</span><span class='lbracket'>[</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:offset</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:limit</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='rbracket'>]</span>
  <span class='ivar'>@topics</span> <span class='op'>=</span> <span class='const'>Topic</span><span class='period'>.</span><span class='id identifier rubyid_where'>where</span><span class='lparen'>(</span><span class='label'>id:</span> <span class='ivar'>@topic_ids</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_fields_for_list'>fields_for_list</span><span class='period'>.</span><span class='id identifier rubyid_includes'>includes</span><span class='lparen'>(</span><span class='symbol'>:user</span><span class='rparen'>)</span>
  <span class='ivar'>@topics</span> <span class='op'>=</span> <span class='ivar'>@topics</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span><span class='period'>.</span><span class='id identifier rubyid_sort_by'>sort_by</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_topic'>topic</span><span class='op'>|</span> <span class='ivar'>@topic_ids</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='id identifier rubyid_topic'>topic</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
  <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='ivar'>@topics</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="follow-instance_method">
  
    #<strong>follow</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>关注用户</p>

<p>POST /api/v3/users/:id/follow</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


159
160
161
162</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/controllers/api/v3/users_controller.rb', line 159</span>

<span class='kw'>def</span> <span class='id identifier rubyid_follow'>follow</span>
  <span class='id identifier rubyid_current_user'>current_user</span><span class='period'>.</span><span class='id identifier rubyid_follow_user'>follow_user</span><span class='lparen'>(</span><span class='ivar'>@user</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='lbrace'>{</span> <span class='label'>ok:</span> <span class='int'>1</span> <span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="followers-instance_method">
  
    #<strong>followers</strong>  &#x21d2; <tt>Array[<span class='object_link'><a href="../../UserSerializer.html" title="UserSerializer (class)">UserSerializer</a></span>]</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>获取某个用户关注的人的列表</p>

<p>GET /api/v3/users/:id/followers</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>offset</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>default: 0</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>limit</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>default: 20, range: 1..150</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array[<span class='object_link'><a href="../../UserSerializer.html" title="UserSerializer (class)">UserSerializer</a></span>]</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>收藏的话题列表</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


117
118
119
120
121
122
123</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/controllers/api/v3/users_controller.rb', line 117</span>

<span class='kw'>def</span> <span class='id identifier rubyid_followers'>followers</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:offset</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>Integer</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>0</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:limit</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>Integer</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>20</span><span class='comma'>,</span> <span class='label'>values:</span> <span class='int'>1</span><span class='op'>..</span><span class='int'>150</span>

  <span class='ivar'>@users</span> <span class='op'>=</span> <span class='ivar'>@user</span><span class='period'>.</span><span class='id identifier rubyid_followers'>followers</span><span class='period'>.</span><span class='id identifier rubyid_fields_for_list'>fields_for_list</span><span class='period'>.</span><span class='id identifier rubyid_offset'>offset</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:offset</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_limit'>limit</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:limit</span><span class='rbracket'>]</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='ivar'>@users</span><span class='comma'>,</span> <span class='label'>root:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>followers</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="following-instance_method">
  
    #<strong>following</strong>  &#x21d2; <tt>Array[<span class='object_link'><a href="../../UserSerializer.html" title="UserSerializer (class)">UserSerializer</a></span>]</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>获取某个用户的关注者列表</p>

<p>GET /api/v3/users/:id/following</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>offset</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>default: 0</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>limit</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>default: 20, range: 1..150</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array[<span class='object_link'><a href="../../UserSerializer.html" title="UserSerializer (class)">UserSerializer</a></span>]</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>收藏的话题列表</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


131
132
133
134
135
136
137</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/controllers/api/v3/users_controller.rb', line 131</span>

<span class='kw'>def</span> <span class='id identifier rubyid_following'>following</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:offset</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>Integer</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>0</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:limit</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>Integer</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>20</span><span class='comma'>,</span> <span class='label'>values:</span> <span class='int'>1</span><span class='op'>..</span><span class='int'>150</span>

  <span class='ivar'>@users</span> <span class='op'>=</span> <span class='ivar'>@user</span><span class='period'>.</span><span class='id identifier rubyid_following'>following</span><span class='period'>.</span><span class='id identifier rubyid_fields_for_list'>fields_for_list</span><span class='period'>.</span><span class='id identifier rubyid_offset'>offset</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:offset</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_limit'>limit</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:limit</span><span class='rbracket'>]</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='ivar'>@users</span><span class='comma'>,</span> <span class='label'>root:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>following</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="index-instance_method">
  
    #<strong>index</strong>  &#x21d2; <tt>Array&lt;<span class='object_link'><a href="../../UserSerializer.html" title="UserSerializer (class)">UserSerializer</a></span>&gt;</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>获取热门用户</p>

<p>GET /api/v3/users</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>limit</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>default: 20，range: 1..100</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="../../UserSerializer.html" title="UserSerializer (class)">UserSerializer</a></span>&gt;</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


13
14
15
16
17
18
19
20</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/controllers/api/v3/users_controller.rb', line 13</span>

<span class='kw'>def</span> <span class='id identifier rubyid_index'>index</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:limit</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>20</span><span class='comma'>,</span> <span class='label'>values:</span> <span class='int'>1</span><span class='op'>..</span><span class='int'>100</span>

  <span class='id identifier rubyid_limit'>limit</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:limit</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
  <span class='id identifier rubyid_limit'>limit</span> <span class='op'>=</span> <span class='int'>100</span> <span class='kw'>if</span> <span class='id identifier rubyid_limit'>limit</span> <span class='op'>&gt;</span> <span class='int'>100</span>
  <span class='ivar'>@users</span> <span class='op'>=</span> <span class='const'>User</span><span class='period'>.</span><span class='id identifier rubyid_fields_for_list'>fields_for_list</span><span class='period'>.</span><span class='id identifier rubyid_hot'>hot</span><span class='period'>.</span><span class='id identifier rubyid_limit'>limit</span><span class='lparen'>(</span><span class='id identifier rubyid_limit'>limit</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='ivar'>@users</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="me-instance_method">
  
    #<strong>me</strong>  &#x21d2; <tt><span class='object_link'><a href="../../UserDetailSerializer.html" title="UserDetailSerializer (class)">UserDetailSerializer</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>获取当前用户的完整信息，用于个人设置修改资料</p>

<p>GET /api/v3/users/me</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../../UserDetailSerializer.html" title="UserDetailSerializer (class)">UserDetailSerializer</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


26
27
28</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/controllers/api/v3/users_controller.rb', line 26</span>

<span class='kw'>def</span> <span class='id identifier rubyid_me'>me</span>
  <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='id identifier rubyid_current_user'>current_user</span><span class='comma'>,</span> <span class='label'>serializer:</span> <span class='const'>UserDetailSerializer</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="replies-instance_method">
  
    #<strong>replies</strong>  &#x21d2; <tt>Array&lt;<span class='object_link'><a href="../../ReplyDetailSerializer.html" title="ReplyDetailSerializer (class)">ReplyDetailSerializer</a></span>&gt;</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>获取某个用户的回帖列表</p>

<p>GET /api/v3/users/:id/replies</p>

<h2 id="label-params-3A">params:</h2>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>order</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>排序方式, default: &#39;recent&#39;, range: %w(recent)</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>offset</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>default: 0</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>limit</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>default: 20, range: 1..150</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="../../ReplyDetailSerializer.html" title="ReplyDetailSerializer (class)">ReplyDetailSerializer</a></span>&gt;</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


82
83
84
85
86
87
88
89
90
91</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/controllers/api/v3/users_controller.rb', line 82</span>

<span class='kw'>def</span> <span class='id identifier rubyid_replies'>replies</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:order</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>String</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>recent</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>values:</span> <span class='qwords_beg'>%w(</span><span class='tstring_content'>recent</span><span class='words_sep'>)</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:offset</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>Integer</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>0</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:limit</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>Integer</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>20</span><span class='comma'>,</span> <span class='label'>values:</span> <span class='int'>1</span><span class='op'>..</span><span class='int'>150</span>

  <span class='ivar'>@replies</span> <span class='op'>=</span> <span class='ivar'>@user</span><span class='period'>.</span><span class='id identifier rubyid_replies'>replies</span><span class='period'>.</span><span class='id identifier rubyid_recent'>recent</span>
  <span class='ivar'>@replies</span> <span class='op'>=</span> <span class='ivar'>@replies</span><span class='period'>.</span><span class='id identifier rubyid_includes'>includes</span><span class='lparen'>(</span><span class='symbol'>:user</span><span class='comma'>,</span> <span class='symbol'>:topic</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_offset'>offset</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:offset</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_limit'>limit</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:limit</span><span class='rbracket'>]</span><span class='rparen'>)</span>

  <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='ivar'>@replies</span><span class='comma'>,</span> <span class='label'>each_serializer:</span> <span class='const'>ReplyDetailSerializer</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="show-instance_method">
  
    #<strong>show</strong>  &#x21d2; <tt><span class='object_link'><a href="../../UserDetailSerializer.html" title="UserDetailSerializer (class)">UserDetailSerializer</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>获取某个用户的详细信息</p>

<p>GET /api/v3/users/:id</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../../UserDetailSerializer.html" title="UserDetailSerializer (class)">UserDetailSerializer</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


34
35
36
37
38
39
40
41
42
43</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/controllers/api/v3/users_controller.rb', line 34</span>

<span class='kw'>def</span> <span class='id identifier rubyid_show'>show</span>
  <span class='id identifier rubyid_meta'>meta</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>followed:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>blocked:</span> <span class='kw'>false</span> <span class='rbrace'>}</span>

  <span class='kw'>if</span> <span class='id identifier rubyid_current_user'>current_user</span>
    <span class='id identifier rubyid_meta'>meta</span><span class='lbracket'>[</span><span class='symbol'>:followed</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_current_user'>current_user</span><span class='period'>.</span><span class='id identifier rubyid_followed?'>followed?</span><span class='lparen'>(</span><span class='ivar'>@user</span><span class='rparen'>)</span>
    <span class='id identifier rubyid_meta'>meta</span><span class='lbracket'>[</span><span class='symbol'>:blocked</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_current_user'>current_user</span><span class='period'>.</span><span class='id identifier rubyid_blocked_user?'>blocked_user?</span><span class='lparen'>(</span><span class='ivar'>@user</span><span class='rparen'>)</span>
  <span class='kw'>end</span>

  <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='ivar'>@user</span><span class='comma'>,</span> <span class='label'>serializer:</span> <span class='const'>UserDetailSerializer</span><span class='comma'>,</span> <span class='label'>meta:</span> <span class='id identifier rubyid_meta'>meta</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="topics-instance_method">
  
    #<strong>topics</strong>  &#x21d2; <tt>Array&lt;<span class='object_link'><a href="../../TopicSerializer.html" title="TopicSerializer (class)">TopicSerializer</a></span>&gt;</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>获取某个用户的话题列表</p>

<p>GET /api/v3/users/:id/topics</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>order</span>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>排序方式, default: &#39;recent&#39;, range: %w(recent likes replies)</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>offset</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>default: 0</p>
</div>
      
    </li>
  
    <li>
      
        <span class='name'>limit</span>
      
      
        <span class='type'>(<tt>Integer</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>default: 20, range: 1..150</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="../../TopicSerializer.html" title="TopicSerializer (class)">TopicSerializer</a></span>&gt;</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>话题列表</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/controllers/api/v3/users_controller.rb', line 54</span>

<span class='kw'>def</span> <span class='id identifier rubyid_topics'>topics</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:order</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>String</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>recent</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>values:</span> <span class='qwords_beg'>%w(</span><span class='tstring_content'>recent</span><span class='words_sep'> </span><span class='tstring_content'>likes</span><span class='words_sep'> </span><span class='tstring_content'>replies</span><span class='words_sep'>)</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:offset</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>Integer</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>0</span>
  <span class='id identifier rubyid_optional!'>optional!</span> <span class='symbol'>:limit</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='const'>Integer</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='int'>20</span><span class='comma'>,</span> <span class='label'>values:</span> <span class='int'>1</span><span class='op'>..</span><span class='int'>150</span>

  <span class='ivar'>@topics</span> <span class='op'>=</span> <span class='ivar'>@user</span><span class='period'>.</span><span class='id identifier rubyid_topics'>topics</span><span class='period'>.</span><span class='id identifier rubyid_fields_for_list'>fields_for_list</span>
  <span class='ivar'>@topics</span> <span class='op'>=</span>
    <span class='kw'>if</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:order</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>likes</span><span class='tstring_end'>&#39;</span></span>
      <span class='ivar'>@topics</span><span class='period'>.</span><span class='id identifier rubyid_high_likes'>high_likes</span>
    <span class='kw'>elsif</span> <span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:order</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>replies</span><span class='tstring_end'>&#39;</span></span>
      <span class='ivar'>@topics</span><span class='period'>.</span><span class='id identifier rubyid_high_replies'>high_replies</span>
    <span class='kw'>else</span>
      <span class='ivar'>@topics</span><span class='period'>.</span><span class='id identifier rubyid_recent'>recent</span>
    <span class='kw'>end</span>
  <span class='ivar'>@topics</span> <span class='op'>=</span> <span class='ivar'>@topics</span><span class='period'>.</span><span class='id identifier rubyid_includes'>includes</span><span class='lparen'>(</span><span class='symbol'>:user</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_offset'>offset</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:offset</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_limit'>limit</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='symbol'>:limit</span><span class='rbracket'>]</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='ivar'>@topics</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="unblock-instance_method">
  
    #<strong>unblock</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>取消屏蔽用户</p>

<p>POST /api/v3/users/:id/unblock</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


183
184
185
186</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/controllers/api/v3/users_controller.rb', line 183</span>

<span class='kw'>def</span> <span class='id identifier rubyid_unblock'>unblock</span>
  <span class='id identifier rubyid_current_user'>current_user</span><span class='period'>.</span><span class='id identifier rubyid_unblock_user'>unblock_user</span><span class='lparen'>(</span><span class='ivar'>@user</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='lbrace'>{</span> <span class='label'>ok:</span> <span class='int'>1</span> <span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="unfollow-instance_method">
  
    #<strong>unfollow</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>取消关注用户</p>

<p>POST /api/v3/users/:id/unfollow</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


167
168
169
170</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/controllers/api/v3/users_controller.rb', line 167</span>

<span class='kw'>def</span> <span class='id identifier rubyid_unfollow'>unfollow</span>
  <span class='id identifier rubyid_current_user'>current_user</span><span class='period'>.</span><span class='id identifier rubyid_unfollow_user'>unfollow_user</span><span class='lparen'>(</span><span class='ivar'>@user</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_render'>render</span> <span class='label'>json:</span> <span class='lbrace'>{</span> <span class='label'>ok:</span> <span class='int'>1</span> <span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

      <div id="footer">
  Generated on Thu Oct 20 19:35:16 2016 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.9.5 (ruby-2.3.1).
</div>

    </div>
  </body>
</html>